package com.jdz.gxq.info.admin.loan.service;

import java.util.List;
import java.util.Map;

import com.jdz.gxq.info.admin.loan.bo.Loan;

public interface LoanService {
	
	/**
	 * Loan检索分页用，查询记录条数
	 * @return
	 */
	public int getLoansCount(String enterpriseName);
	
	/**
	 * Loan检索
	 * @return
	 */
	public List<Loan> getLoans(Map<String, Object> params);
	
	/**
	 * 追加Loan
	 * @param loan
	 */
	public void insertLoan(Loan loan);
	
	/**
	 * 更新Loan
	 * @param loan
	 */
	public void updateLoan(Loan loan);
	
	/**
	 * 通过id得到loan
	 * @param id
	 * @return
	 */
	public Loan getLoanById(int id);
	
	/**
	 * 删除Loan
	 * @param loan
	 */
	public void deleteLoan(int id);
	
	/**
	 * 验证loanName是否重复
	 * (重复返回:false)
	 * flag: 1 追加时验证
	 * flag: 2 更新时验证
	 */
	public boolean checkLoanName(Loan paramLoan, int flag);

}
